# -*-coding:utf-8 -*-

"""
# File       : jsonDifferent.py
# Time       ：2023/4/4 下午6:43
# Author     ：puppet
# version    ：python 3.8.1
# Description：
"""
import json_tools


def showJsonDiff(apiRes:dict, replayRes:dict):
    """
    Null Exception.
    :param apiRes:Parameter json stored in mysql.
    :param replayRes:Respons json.
    :return:Difference between in apiRes and replayRes.
    """
    print("apiRes", apiRes)
    result = json_tools.diff(apiRes, replayRes)
    # return False if len(result) ==0 else result
    return {
        "idDifferent":False if len(result) ==0 else result,
        "replayRespon":replayRes
    }

# a={    'left': 1, 'right': "r","box":"b"}
# b={'haha': 1,'haha1': 1, 'right': "r","box":"b1"}
# c={'left': 1, 'right': "R","boxs":"box"}
# print(showJsonDiff(a,b))